package cn.iocoder.yudao.module.resource.api.model;

import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * 声纹
 *
 * @author: wds_prc
 * @since: 2024/7/28 15:04
 */
@Data
public class AudioToneDTO {
    /**
     * 唯 一id
     */
    private Integer id;
    /**
     * 声纹名称
     */
    private String name;
    /**
     * 声纹文件id
     */
    private Long fileId;

    /**
     * 音色复刻id
     */
    private String cloneVoiceId;

    /**
     * 音色复刻对象
     */
    private CloneVoice cloneVoiceObj;

    public String getCloneVoiceIdByTssName(String tssName) {
        if (cloneVoiceObj == null) {
            return null;
        }
        return cloneVoiceObj.getTtsNameCloneVoiceIdMap().get(tssName);
    }

    @Data
    public static class CloneVoice {
        private Map<String, String> ttsNameCloneVoiceIdMap;

    }
}
